package com.test.demo2.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo2")
@Api("Demo2")
public class Demo2Controller {
    //这里如何才能用Demo1Controller

    //@Autowired
    //Demo1Controller demo1Controller;

    @ApiOperation(value = "测试")
    @RequestMapping(
            value = "/test",
            method = RequestMethod.GET,
            produces = {MediaType.APPLICATION_JSON_VALUE})
    String diningTableAllocates() {
        return "demo2";
    }
}
